Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS Build is failing #171

Closed
Abosrie opened this issue Oct 3, 2019 · 4 comments
Closed

IOS Build is failing #171

Abosrie opened this issue Oct 3, 2019 · 4 comments

Comments

@Abosrie
Copy link

Abosrie commented Oct 3, 2019

The IOS was working fine with flutter_inappbrowser in the beginning then out of sudden it's not building anymore.

I am getting the below error:

Xcode's output:

/Users/ahmedabosrie/development/flutterSDK/.pub-cache/hosted/pub.da
rtlang.org/flutter_inapp_purchase-0.8.8+2/ios/Classes/FlutterInappP
urchasePlugin.m:341:36: warning: 'transactionReceipt' is
deprecated: first deprecated in iOS 7.0 [-Wdeprecated-declarations]
receiptData = [transaction transactionReceipt];
^~~~~~~~~~~~~~~~~~
-[NSBundle appStoreReceiptURL]
In module 'StoreKit' imported from
/Users/ahmedabosrie/development/flutterSDK/.pub-cache/hosted/pub.da
rtlang.org/flutter_inapp_purchase-0.8.8+2/ios/Classes/FlutterInappP
urchasePlugin.h:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulato
r.platform/Developer/SDKs/iPhoneSimulator13.1.sdk/System/Library/Fr
ameworks/StoreKit.framework/Headers/SKPaymentTransaction.h:47:50:
note: property 'transactionReceipt' is declared deprecated here
@Property(nonatomic, readonly, nullable) NSData *transactionReceipt
API_DEPRECATED_WITH_REPLACEMENT("-[NSBundle appStoreReceiptURL]",
ios(3.0, 7.0)) API_UNAVAILABLE(macos, macCatalyst);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulato
r.platform/Developer/SDKs/iPhoneSimulator13.1.sdk/System/Library/Fr
ameworks/StoreKit.framework/Headers/SKPaymentTransaction.h:47:50:
note: 'transactionReceipt' has been explicitly marked deprecated
here
1 warning generated.
=== BUILD TARGET image_picker OF PROJECT Pods WITH CONFIGURATION
Debug ===
/Users/ahmedabosrie/development/flutterSDK/.pub-cache/hosted/pub.da
rtlang.org/flutter_inappbrowser-1.2.1/ios/Classes/FlutterWebViewCon
troller.swift:30:17: warning: result of call to 'parse(options:)'
is unused
options.parse(options: initialOptions)
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ahmedabosrie/development/flutterSDK/.pub-cache/hosted/pub.da
rtlang.org/flutter_inappbrowser-1.2.1/ios/Classes/FlutterWebViewCon
troller.swift:52:46: warning: conditional downcast from 'String?'
to 'String' does nothing
let data = (initialData!["data"] as? String)!
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

/Users/ahmedabosrie/development/flutterSDK/.pub-cache/hosted/pub.da
rtlang.org/flutter_inappbrowser-1.2.1/ios/Classes/FlutterWebViewCon
troller.swift:53:54: warning: conditional downcast from 'String?'
to 'String' does nothing
            let mimeType = (initialData!["mimeType"] as? String)!
                            ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

/Users/ahmedabosrie/development/flutterSDK/.pub-cache/hosted/pub.da
rtlang.org/flutter_inappbrowser-1.2.1/ios/Classes/FlutterWebViewCon
troller.swift:54:54: warning: conditional downcast from 'String?'
to 'String' does nothing
            let encoding = (initialData!["encoding"] as? String)!
                            ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

/Users/ahmedabosrie/development/flutterSDK/.pub-cache/hosted/pub.da
rtlang.org/flutter_inappbrowser-1.2.1/ios/Classes/FlutterWebViewCon
troller.swift:55:52: warning: conditional downcast from 'String?'
to 'String' does nothing
            let baseUrl = (initialData!["baseUrl"] as? String)!
                           ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

Flutter Doctor
[✓] Flutter (Channel unknown, v1.5.0, on Mac OS X 10.14.6 18G95, locale
en-MY)
[✓] Android toolchain - develop for Android devices (Android SDK
version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 11.1)
[✓] Android Studio (version 3.3)
[✓] VS Code (version 1.38.1)
[✓] Connected device (1 available)


This is my podfile

target 'Runner' do
use_frameworks!

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')

Flutter Pods

generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}

Plugin Pods

plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
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['SWIFT_VERSION'] = '4.0' # required by simple_permission
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end


Final note - If I removed the flutter_inappbrowser plugin everything is working fine!!

@Abosrie
Copy link
Author

Abosrie commented Oct 4, 2019

I solved the issue by accessing the flutter packages and deleting the plugin manually then run pub get again! Not sure what is the root cause.

@boozy-ph
Copy link

I solved the issue by accessing the flutter packages and deleting the plugin manually then run pub get again! Not sure what is the root cause.

@Abosrie may I know what specific file is flutter packages and where can I find them?

@pichillilorenzo
Copy link
Owner

@boozy-ph I think he means the .pub-cache folder! You could try also this: https://stackoverflow.com/a/55399559/4637638

This was referenced Jul 6, 2020
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants