how to install Google maps SDK in xcode project - ios

I followed the instructions provided here by google about manually installing google maps SDK, but I have an issue:
When I right-click GoogleMaps.framework, then click show in finder, I can't find resources folder or GoogleMaps.bundle!
my environment:
OS X El Capitan (virtual machine, using vmware)
Xcode 7.3.1
I am adding it to a swift project that uses story board
I did follow exactly what instructions said, and ticked "copy items if needed"
what I have done wrong?
thanks

You have to install cocoapods correctly before in order to integrate google map to your project.
Steps to install cocoapods:
Open terminal and type: sudo gem install cocoapods
In terminal go to your project and type: pod init this will create podfile inside your project
In last type: pod install
Note: do not forgot to edit your podfile before install using Link as mentioned and use .xcworkspace file (this will automatically created after install cocoapod) to launch Xcode for further development.
Terminal screen will look like this if you installed cocoapods successfully, see image.
for further in google map see here

Related

Xcode build with Google UMP SDK fails with 'framework not found'

We make middleware using Cordova and AdMob to show ads. Cordova generates an Xcode project for us. However the resulting Xcode projects now fail to build with the error ld: framework not found UserMessagingPlatform.xcframework.
This appears to be caused by the Google UMP SDK updating to version 1.3.0, which notes "Updated the SDK from a .framework to a .xcframework." I've contacted AdMob support, and they claim the build works for them and haven't provided any useful help.
I have no idea why our builds now fail and I'm at a loss as to what to do about it. Here is a sample Xcode project: https://www.dropbox.com/s/y1ly2c3yi45rop6/TestBuild.ios.project.zip?dl=0
Can anyone identify what has gone wrong with this Xcode project causing it to fail to build, and identify a workaround?
The Issue
The issue appears to be that a framework/dependency is not added to the Xcode project, so it doesn't have the code necessary to compile the application. AdMob relies on that UserMessagingPlatform thing to work, and without the Mobile Ads SDK being present in your codebase, UserMessagingPlatform is missing and your application is essentially asking for code that isn't there. To resolve this, you have to tell cocoapods (a dependency manager, think npm but for Swift/Objective-C) to locate and add the missing code to your project.
First, install cocoapods if you haven't already. I used Homebrew to do this, as it seems to be the only method that worked without headache. Many people already have Homebrew, but if you don't, install that first, then run:
brew install cocoapods
Next, go into your project directory using the Terminal. Once you're in the directory, run:
pod install --repo-update
Reopen your project in Xcode, and it should compile successfully now.
Step by step resolution:
Skip any steps that aren't necessary for your environment.
Install Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Install cocoapods: brew install cocoapods
Open a terminal, navigate to your project directory: cd /path/to/your/project
Update dependencies: pod install --repo-update
Disclaimer: I'm not a Swift or Objective-C developer, and my experience with Apple/Xcode is limited. I also am unfamiliar with "cocoapods" and AdMob. I just downloaded the sample code and worked through the issue until I got it to compile successfully.
Are you using Cocoapods for your XCode project?
This stackoverflow answer suggest updating cocoapods
Try updating cocoapods:
sudo gem install cocoapods
Cocoapods changelog contains fixes for XCFrameworks
.xcframework files can only be used on CocoaPods 1.10.0 or newer, in your sample app you were using 1.8.4.
Update CocoaPods to latest and run pod install again.

Swift and Xcode: How to Build and Run a GitHub repository of iOS Application?

I'm interested on Running this GitHub repository of an iOS Application: https://github.com/septadev/SEPTA-iOS I opened the iSEPTA.xcodeproj file on XCode from the iSEPTA folder, but I'm getting these Buildtime Errors. For example: No such module 'ReSwift', and this is the window I get prompted when I select any of the yellow alerts, I'm not sure if I should perform these changes, yet.
Could it be some incomparability with my XCode and Swift versions?
Please, help!!
This project uses Carthage as a dependency management system for using external dependencies.
You should install Carthage to your computer and then run carthage update from the terminal in the root directory of the project. This will instal the dependencies and will allow you to run the project.
Take a look at Cartfile: it indicates this repo is using Carthage package manager. Follow their instructions to install dependent libraries
This repository requires Carthage ( https://github.com/Carthage/Carthage ) - this is a dependency manager. You can install it using Homebrew (https://brew.sh/)
brew install carthage
then you have to run carthageBuild.sh script (which runs carthage update):
./carthageBuild.sh
and then you have to open: Septa.xcworkspace file
This would be the correct solution if the project used Cocoapods. Since it uses Carthage, look to others answers unless you are referencing this answer to a similar issue.
You need to use Cocoapods to integrate the pods attached to the project. Often times projects will not come with them precompiled. Either you opened the blue project file with the *.xcodeproj extension instead of the white project file with the *.xcworkspace extension.... or you don't have the pods installed at all. In which case read below.
Instructions as follows:
cd to project directory
Install Cocoapods
sudo gem install cocoapods
Ensure the you have the given pods in your repo collection for install
pod repo update
Install the pods
pod install
Validate Project Settings
This is necessary until cocoapods v1.6 release (beta is out).
Open the white project file with the *.xcworkspace extension
After those steps are complete, the project should run normally.

react-native-camera is not working in iOS

Hi I want to use camera in my react-native app.
For this I am following this:
https://github.com/react-native-community/react-native-camera
Its is running in Android in Windows Machine, but while am coming to iOS it is not running Mac OS.
The app is installed and loading app name and then it is crashed in iPhone.
Some times its showing an error like react-native-implementation.js: cannot read property 'bindings' of null (null)
For solving this issue, manually added this module to my project like below
Manual install iOS
npm install react-native-camera --save
In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name]
Go to node_modules ➜ react-native-camera and add RNCamera.xcodeproj
Expand the RNCamera.xcodeproj ➜ Products folder
In XCode, in the project navigator, select your project.
Add libRNCamera.a to your project's Build Phases ➜ Link Binary With Libraries
Click RNCamera.xcodeproj in the project navigator and go the Build Settings tab.
Make sure 'All' is toggled on (instead of 'Basic').
In the Search Paths section, look for Header Search Paths and make sure it contains both $(SRCROOT)/../../react-native/React and $(SRCROOT)/../../../React - mark both as recursive.
My System configuration:
I am using the PyCharm Editor for implementing my react-native projects.
npm: 6.1.0
react-native-cli: 2.0.1
react-native: 0.56.0
macOS HighSierra 10.13.5
Xcode 9.4.1.
This Bug seems related to upgrading to react-native#0.56.0.
Unfortunately there is no general solution yet. It will probably be fixed in react-native#0.56.1.
You should follow https://github.com/facebook/react-native/issues/20074 and linked issues.
Meanwhile try to use an older version of react-native like 0.55.4.

Realm.framework/Headers No such file or directory

ln: It/BuildProductsPath/Release/Realm/Realm.framework/Headers: No such file or directory
ln: It/BuildProductsPath/Release/Realm/Realm.framework/PrivateHeaders: No such file or directory
I can build & run the project, but when I am trying to archive the project, it shows me this error. I have tried cleaning up the project and deleting derived data, but that didn't help me.
I am using Realm in macOS App. I installed macOS 10.12.1 and tried archiving the project, then this error appeared. It was working fine in previous macOS version.
Please help me to solve this, Thanks in Advance.
I have updated to new cocoa pods [ Dmitry pointed out ], now I am using cocoa pods beta version.
I have installed the beta version using this command sudo gem install cocoapods --pre. Now the pod --version command shows me that the cocoa pods version is 1.2.0.beta.1. Tried archiving the project again, but the same error appears.
This is a CocoaPods issue that was fixed in https://github.com/CocoaPods/CocoaPods/pull/6146.
Please try to update to the latest CocoaPods [beta] version.
Looks like the current beta doesn't include that fix, so for now the workaround I suggest is to simply add missing quotes to your project manually:
Select Pods project in project navigator
Select Realm target -> Build Phases
Find Create Symbolic Links to Header Folders and replace the script to
base="$CONFIGURATION_BUILD_DIR/$WRAPPER_NAME"
ln -fs "$base/${PUBLIC_HEADERS_FOLDER_PATH#$WRAPPER_NAME/}" "$base/${PUBLIC_HEADERS_FOLDER_PATH#$CONTENTS_FOLDER_PATH/}"
ln -fs "$base/${PRIVATE_HEADERS_FOLDER_PATH#$WRAPPER_NAME/}" "$base/${PRIVATE_HEADERS_FOLDER_PATH#$CONTENTS_FOLDER_PATH/}"

Upgrade Third Party Library with Cocoapods

I have a project in which I am using coreplot 1.0 for graphing. (This sets the Header search path.)
How can I manage the same code with new a version of coreplot under Cocoapods? I deleted the old version, cleared the header search path etc. But after adding the new version in my project I am getting an error.
I am using following commands:
touch Podfile
edit Podfile # ( IOS version , Coreplot 1.4 version)
pod install
When I open the project workstation and try a build, I get an error.
You can either install CorePlot via CocoaPods or the manual way here.
Choose one.

Resources