Baseflow / flutter-permission-handler

Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
https://baseflow.com
MIT License
2.05k stars 858 forks source link

Apple Connect reject my app with unuse permission #222

Closed athlona64 closed 4 years ago

athlona64 commented 4 years ago

šŸ’¬ Questions and Help

Dear Developer,We identified one or more issues with a recent delivery for your app, "Likewallet" 1.0.31 (31). Please correct the following issues, then upload again.ITMS-90683: Missing Purpose String in Info.plistĀ - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSContactsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).ITMS-90683: Missing Purpose String in Info.plistĀ - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSMotionUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).Though you are not required to fix the following issues, we wanted to make you aware of them:ITMS-90683: Missing Purpose String in Info.plistĀ - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSLocationAlwaysUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).ITMS-90809: Deprecated API UsageĀ - Apple will stop accepting submissions of apps that use UIWebView APIs starting from April 2020 . SeeĀ https://developer.apple.com/documentation/uikit/uiwebviewĀ for more information.Best regards,The App Store Team | Ā  | Ā  | Dear Developer,We identified one or more issues with a recent delivery for your app, "Likewallet" 1.0.31 (31). Please correct the following issues, then upload again.ITMS-90683: Missing Purpose String in Info.plistĀ - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSContactsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).ITMS-90683: Missing Purpose String in Info.plistĀ - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSMotionUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).Though you are not required to fix the following issues, we wanted to make you aware of them:ITMS-90683: Missing Purpose String in Info.plistĀ - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSLocationAlwaysUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).ITMS-90809: Deprecated API UsageĀ - Apple will stop accepting submissions of apps that use UIWebView APIs starting from April 2020 . SeeĀ https://developer.apple.com/documentation/uikit/uiwebviewĀ for more information.Best regards,The App Store Team Ā  Dear Developer,We identified one or more issues with a recent delivery for your app, "Likewallet" 1.0.31 (31). Please correct the following issues, then upload again.ITMS-90683: Missing Purpose String in Info.plistĀ - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSContactsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).ITMS-90683: Missing Purpose String in Info.plistĀ - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSMotionUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).Though you are not required to fix the following issues, we wanted to make you aware of them:ITMS-90683: Missing Purpose String in Info.plistĀ - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSLocationAlwaysUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).ITMS-90809: Deprecated API UsageĀ - Apple will stop accepting submissions of apps that use UIWebView APIs starting from April 2020 . SeeĀ https://developer.apple.com/documentation/uikit/uiwebviewĀ for more information.Best regards,The App Store Team

in this Podfile:

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def parse_KV_file(file, separator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  generated_key_values = {}
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) do |line|
    next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
    plugin = line.split(pattern=separator)
    if plugin.length == 2
      podname = plugin[0].strip()
      path = plugin[1].strip()
      podpath = File.expand_path("#{path}", file_abs_path)
      generated_key_values[podname] = podpath
    else
      puts "Invalid plugin specification: #{line}"
    end
  end
  generated_key_values
end

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  # Flutter Pod

  copied_flutter_dir = File.join(__dir__, 'Flutter')
  copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
  copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
  unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
    # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
    # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
    # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.

    generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
    unless File.exist?(generated_xcode_build_settings_path)
      raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
    end
    generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
    cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];

    unless File.exist?(copied_framework_path)
      FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
    end
    unless File.exist?(copied_podspec_path)
      FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
    end
  end

  # Keep pod path relative so it can be checked into Podfile.lock.
  pod 'Flutter', :path => 'Flutter'

  # Plugin Pods
  pod 'Firebase/Analytics'
  pod 'Firebase/Core'
  pod 'Firebase/Auth'
  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  # referring to absolute paths on developers' machines.
  system('rm -rf .symlinks')
  system('mkdir -p .symlinks/plugins')
  plugin_pods = parse_KV_file('../.flutter-plugins')
  plugin_pods.each do |name, path|
    symlink = File.join('.symlinks', 'plugins', name)
    File.symlink(path, symlink)
    pod name, :path => File.join(symlink, 'ios')
  end
end

# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'

      # You can remove unused permissions here
      # e.g. when you don't need camera permission, just add 'PERMISSION_CAMERA=0'
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
        '$(inherited)',
    ## dart: PermissionGroup.calendar
        'PERMISSION_EVENTS=0',

        ## dart: PermissionGroup.reminders
        'PERMISSION_REMINDERS=0',

        ## dart: PermissionGroup.contacts
        'PERMISSION_CONTACTS=0',

        ## dart: PermissionGroup.camera
        # 'PERMISSION_CAMERA=0',

        ## dart: PermissionGroup.microphone
        'PERMISSION_MICROPHONE=0',

        ## dart: PermissionGroup.speech
        'PERMISSION_SPEECH_RECOGNIZER=0',

        ## dart: PermissionGroup.photos
        #'PERMISSION_PHOTOS=0',

        ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
         'PERMISSION_LOCATION=0',

        ## dart: PermissionGroup.notification
        # 'PERMISSION_NOTIFICATIONS=0',

        ## dart: PermissionGroup.mediaLibrary
        'PERMISSION_MEDIA_LIBRARY=0',

        ## dart: PermissionGroup.sensors
        #'PERMISSION_SENSORS=0'
        ]    
    end
  end
end

pubspec.yaml

dependencies:
  flutter_platform_widgets: ^0.20.3-beta.1
  path_provider: ^1.3.0
  flutter:
    sdk: flutter
  permission: ^0.1.3
  share: ^0.6.2+1
  fluttertoast: ^3.1.3
  shared_preferences: 0.4.3
  flutter_screenutil: ^0.5.2
  qr_flutter: ^3.0.1
  web3dart: ^1.1.1+1
  web_socket_channel: ^1.0.8
  bip39: ^1.0.2
  bitcoin_flutter: ^1.0.7
  toast: ^0.1.3
  crypto: ^2.0.6
  flutter_spinkit: ^4.1.1+1
  after_layout: ^1.0.7+2
  cached_network_image: ^2.0.0
  intl: ^0.16.0
  barcode_scan: ^1.0.0
  ethereum: 4.0.1
  bmnav: 0.3.4
  loading_indicator: ^1.0.0
  image_gallery_saver: ^1.2.2
  firebase_storage: ^3.1.1
  package_info: ^0.4.0+13
  native_widgets: ^1.3.5
    # The following adds the Cupertino Icons font to your application.
    # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2
  modal_progress_hud: ^0.1.2
  http: ^0.12.0+2
  auto_size_text: ^2.0.1
  flutter_file_manager: ^0.2.0
  contacts_service: ^0.0.8
  pattern_formatter: ^1.0.1
  countdown: ^0.1.0
  english_words: ^3.1.0
  #man
  ed25519_hd_key: ^1.0.1
  dart_ssss: ^0.0.5
  local_auth: ^0.6.0+1
  get_it: ^3.0.1
  passcode_screen:
    path: ./passcode_screen-1.0.2
  firebase_auth: 0.15.3+1
  firebase_core: 0.4.4
  permission_handler: ^4.3.0
  firebase_analytics: ^5.0.6
  pull_to_refresh: ^1.5.7
  cloud_firestore: ^0.12.11
  bip32: ^1.0.5
  json_annotation: ^3.0.0
  provider: ^3.2.0
  flutter_share_me: ^0.9.0
  encrypt: ^4.0.0
  flutter_secure_storage: ^3.3.1+1
  ads: ^1.7.2
  image_picker: ^0.6.3+1
  http_parser: ^3.1.3
  dio: ^3.0.8
  infinite_listview: ^1.0.1+1
  qrscan: ^0.2.17
  rxdart: ^0.23.1
  keyboard_actions: ^3.2.0
  keyboard_visibility: ^0.5.6
  #ios pod
#  flutter_camera_ml_vision: ^2.2.4
  camera: ^0.5.7+3
  qr_mobile_vision: ^0.3.1
  launch_review: ^2.0.0
  firebase_messaging: ^6.0.9
  flutter_local_notifications: ^1.2.0+2

#  flutter_money_formatter:
#    path: ./flutter_money_formatter
  snaplist: ^0.1.8
  sms_autofill: ^1.1.1

  flutter_localizations:
    sdk: flutter

dev_dependencies:
  flutter_test:
    sdk: flutter
  firebase_auth: ^0.15.3+1
  flutter_launcher_icons: ^0.7.4
  firebase_core: ^0.4.0+9
  pedantic: ^1.7.0
  json_annotation: ^3.0.0
  build_runner: ^1.7.2

flutter_icons:
  ios: true
  image_path: assets/icon/icon.png
athlona64 commented 4 years ago

in app not use but dependencies use this

rlee1990 commented 4 years ago

@athlona64 how did you get this to work?