Open a0fzide opened 4 years ago
Hey @a0fzide
You need to follow these steps as mentioned in Readme after adding the plugin and before doing a build :-
For iOS please also follow the steps below.
- Once the iOS platform is added in command line, change directory to where podfile is found. Example location :- (myapp/platforms/ios).
- Make sure you have cocoapods installed then in command line do
pod update
.- Now open myapp.xcworkspace which is usually found in the same directory as the podfile, then build and run.
Note :- if you use myapp.xcodeproj to build and run, it will not work and it will show a linker error.
Note :- if you manually create the podfile, please refer to issue #2
I wanna re-open this issue.
I have the same problem. The solution above works once. But how may I continuously develop on iOS using this plugin? I need cordova build to work for testing and production environment. Also things like live reload seem not to work as long as the usual XCode command line build is not working.
Can you fix the command line build?
You can use build flags to build via cli after the pod install step. Refer to the cordova official website to learn about build flags.
Here is an example build cli command with build flags :-
cordova build ios --device --codeSignIdentity="iPhone Developer" --developmentTeam="<yourTeamId>" --buildFlag="-allowProvisioningUpdates" --buildFlag="-UseModernBuildSystem=0"
You might have to change some things based on your setup.
Problem is that the build is still not working. I get either the "GoogleMVTextDetectorResources.bundle not found" error or when I run pod install/update manually I get the "'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0" error.
So my question is how may we achieve a working build without errors?
Ok. I played around a bit but have no real progress here.
I found out that the version mismatch for IOS comes from the Google implementation because it's simply too old. But it's only a warning. So it doesn't block the build.
But the build still fails because it can't find the bundle. The file is available in the platform/ios/build/emulator directory but the build itself fails because xcode is searching the file in kind of a temporary build directory from which the build will run. So it seems like whatever is triggering the build doesn't copy over the .bundle file. So it's missing in the actual build and therefore the build is failing.
And it doesn't matter if you run "pod install" and/or "pod update".
So it seems like there is something wrong with the build process of cordova itself. I'm not sure who's responsible for this file preparation.
But considering all these problems I would say the plugin (or any plugin based on cacoapods?) is not compatible to iOS.
Is there anyone out there with a working iOS build solution for current iOS, xcode and MacOS version?
Could you try the following
cordova platform rm ios
cordova platform add ios@x.x.x
- where x.x.x is the cordova-ios version you are usingcd platform/ios
pod install
cd ..
cd ..
cordova build ios
- let it build and fail its okaycd platform/ios
yourapp.xcworkspace
file, which will open with xcodeThen build and run using a device rather than a simulator
First build with error : warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.2.99. (in target 'GTMSessionFetcher' from project 'Pods')
I put this code in podfile
post_install do |pi| pi.pods_project.targets.each do |t| t.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0' end end end
after that I build again.
This error apprears after build ios
Build/Products/Debug-iphonesimulator/GoogleMobileVision/GoogleMVTextDetectorResources.bundle" not found. Run 'pod install' to update the copy resources script.