[Apple Store]restrict the locations

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

[Apple Store]restrict the locations

Postby Lena » Fri Nov 09, 2018 12:43 am

Hello.
A mobile application has been created for one of the pharmacies in the city of Denver USA. In addition to medical products, marijuana is sold there it is officially authorized. In the developer’s console apple I dropped all countries and left only the USA and Canada. In Canada official sale of marijuana is also permitted.
However, when I try to publish the application I get a refusal:
Guideline 1.4.3 - Safety - Physical Harm
Your app offers medicinal or recreational marijuana dispensary information, which is not legal in all of the locations where your app is available.
Next Steps
Please revise your app to restrict the locations where your app can be used.


I read this: CoreLocation
But I did not understand how to implement Next Steps on FMX for USA and Canada. Please tell me how to.
Lena
BCBJ Master
BCBJ Master
 
Posts: 584
Joined: Sun Feb 06, 2011 1:28 pm

Re: [Apple Store]restrict the locations

Postby rlebeau » Fri Nov 09, 2018 12:58 pm

You are probably getting rejected because marijuana is not legalized in the entire USA, a few states still have not legalized it yet even for medical use (whereas marijuana is legal for both recreation and medicine in the entire Canada). So, limiting your app to the USA as a whole is likely a bit too broad for Apple's guidelines.
Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1545
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA

Re: [Apple Store]restrict the locations

Postby Lena » Mon Nov 12, 2018 2:19 am

Hi.
How to perform Next Steps?:
Guideline 1.4.3 - Safety - Physical Harm
Your app offers medicinal or recreational marijuana dispensary information, which is not legal in all of the locations where your app is available.
Next Steps
Please revise your app to restrict the locations where your app can be used.
Resources
For information on location awareness options, please review the https://developer.apple.com/library/arc ... ction.html available in the iOS Developer Center.
If you are interested in implementing geo-blocking, please review https://developer.apple.com/library/arc ... ation.html



How to determine if an application is running in Colorado? If not, disable launch.
FMX TGeocoder AdminArea? how to use?
Last edited by Lena on Tue Nov 13, 2018 3:00 am, edited 1 time in total.
Lena
BCBJ Master
BCBJ Master
 
Posts: 584
Joined: Sun Feb 06, 2011 1:28 pm

Re: [Apple Store]restrict the locations

Postby rlebeau » Mon Nov 12, 2018 11:56 am

Lena wrote:What now? How to perform Next Steps?


I don't have an answer for that.
Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1545
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA

Re: [Apple Store]restrict the locations

Postby Lena » Thu Nov 15, 2018 12:59 am

Hi, rlebeau.
Help please find the problem in my code.
All breakpoints are normal.
However, the event OnGeocodeReverseEvent is not executed.
Code: Select all
//h file
#include <System.Sensors.Components.hpp>
#include <System.Sensors.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:   // IDE-managed Components
   TLocationSensor *LocationSensor1;
   TLabel *Label1;
   TLabel *Label2;
   TButton *Button1;
   TMemo *Memo1;
   TEdit *Edit1;
   TEdit *Edit2;
   TCheckBox *CheckBox1;
   void __fastcall LocationSensor1LocationChanged(TObject *Sender, const TLocationCoord2D &OldLocation,
        const TLocationCoord2D &NewLocation);
   void __fastcall FormShow(TObject *Sender);
private:   // User declarations
    TGeocoder *fGeocoder;
public:      // User declarations
   __fastcall TForm1(TComponent* Owner);
   void __fastcall OnGeocodeReverseEvent(TCivicAddress* const Address);
};


Code: Select all
//cpp
//---------------------------------------------------------------------------

#include <fmx.h>
#pragma hdrstop

#include "geo.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.fmx"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
   : TForm(Owner)
{
 LocationSensor1->Active=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::LocationSensor1LocationChanged(TObject *Sender, const TLocationCoord2D &OldLocation,
        const TLocationCoord2D &NewLocation)
{
   if (CheckBox1->IsChecked == true)
   {
     Edit1->Text = NewLocation.Latitude;
     Edit2->Text = NewLocation.Longitude;
   }

   try
    {
     if(fGeocoder == NULL)
      {
       if(TGeocoder::Current != NULL)
         {
         fGeocoder = (TGeocoder*)new TGeocoderClass(TGeocoder::Current);
           }

       if(fGeocoder != NULL)
         {
         fGeocoder->OnGeocodeReverse = OnGeocodeReverseEvent;// breakpoint OK
           }

      }

     if((fGeocoder != NULL) && (fGeocoder->Geocoding()))
       {
        fGeocoder->GeocodeReverse(NewLocation);
         }

    }
    catch (const Exception &E)
        {
         String MES =  E.Message;
         ShowMessage(L"Error: " + MES);
        }


}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormShow(TObject *Sender)
{
   CheckBox1->IsChecked=true;
}
//---------------------------------------------------------------------------
 void __fastcall TForm1::OnGeocodeReverseEvent(TCivicAddress* const Address)
 {
    if (Address!= NULL)
    {
      Memo1->Lines->Add(Address->CountryName);
      Memo1->Lines->Add(Address->AdminArea);
    }
    /*
    if((Address->CountryName != "USA") &&(Address->AdminArea != "Colorado"))
    {
      ShowMessage(L"This app only for Colorado.");
      LocationSensor1->Active = false;
      Application->Terminate();
     }
     */
 }
Lena
BCBJ Master
BCBJ Master
 
Posts: 584
Joined: Sun Feb 06, 2011 1:28 pm


Return to Technical

Who is online

Users browsing this forum: No registered users and 9 guests

cron