PayMill SDK iOS swift 3.0 Xcode 8.1 - ios

I'm trying to use PayMill SDK in a Swift project.
I used CocoaPods as described by PayMill, the framework, and it generated 'Pods_PayMilDSK'
After that I tried to import it on my file but I can't get access to any to the functions included in the framework.
I also tried to import the framework directly in my project but I can't access the PayMillSDK framework (i.e. import does not 'see' it).
Any help would be greatly appreciated.
Rodolphe

After running pod install You should always Build your project, cmd + B, because your project still hasn't read the contents of the library you just installed.
Also make sure you're using the .xcworkspace and not the .xcodeproj

I can now make the import of the PAyMill module but functions are not available

Related

How to use GoogleMaps in local Swift Package?

I'm trying to build an iOS Application which provides AppClips. This means I need to put my code into modules so that the AppClip can reuse some of the code from the main application. The reusable part is using GoogleMaps and that SDK is not yet available via SPM. There is a third-party-fork which makes it SPM-compatible and it kind of works, but it wont let me upload the build because the GoogleMaps SDK gets imported/linked multiple times. Also there is some kind of error stating that it is not "inside the framework folder".
Can anyone provide a solution as to how to use GoogleMaps inside of a local Swift Package? I'm even fine with some kind of hack, because I still hope Google will provide SPM support soon.
So is there a way to use cocoapods or carthage pods or whatever inside a local Swift Package?

Main app can't reference framework used in React Native Library

I need some advice about building react native library that using framework. I'm trying to build one using this library. My react native library contains these files:
Sample-Bridging-Header.h
Sample.m
Sample.swift
Sample.xcodeproj/
Utilities/Utility.swift
Utilities/Helper.swift
Test.framework
Inside my Utility.swift and Helper.swift, I import library Test and there is no issue there.
However, when I build the sample app which uses the library, it will not build and it gives the error no such module 'Test'.
So it looks like if the main application try to use the react native library, and if the library uses a framework, the main application can't reference the framework. I'm not sure if this is the right approach or not.
I built react native library before and it worked for me but I never have to reference any framework.
Appreciate any help! Thanks!
Actually I just figured out how to handle this. I just need to update the podspec to include the framework by using s.ios.vendored_frameworks = ios/Test.framework.
Once I did that, I run pod install again for my example project. So now it can pull the framework in properly.

Reference a CocoaPod from a local Swift Package

I have an Xcode 11 iOS project where I have created a local Swift Package for some basic services.
I have also added CocoaPod support where I am using a CocoaPod (SwiftEntryKit) for some UI stuff in the main project (not the Swift Package) which works fine.
Now I would like to reference a new CocoaPod (SwifterSwift) from within the local Swift Package itself. Is this possible? It does not have access to the SwiftEntryKit Pod I am already using in the main project - if I import it, it does not know the modules.
If you cannot reference Cocoapods from a Swift Package it makes the package rather limiting.
Thanks.

What is a correct bridging header for Flurry?

I’m trying to integrate Flurry using CocoaPods in my Swift project. "pod install" downloads Flurry in the project files, but I can’t set a correct path in the bridge-file for FlurrySDK (everything is fine with all other obj-c dependencies).
Where/how can I find a correct import path?
When you are using latest CocoaPod to install external dependencies to Xcode Project, you don't really need the bridging header to expose Objective-C methods to Swift. See below screenshots once to understand it clearly.
Creating and Installing Pods.
Importing Flurry SDK in a Swift class.
Hope this helped. Thanks.

How do I use Realm in a Swift Playground?

So, I'm pretty new to XCode development, but I've read the documentation on how to import third party frameworks into a Playground in XCode 7.1.1, and the documentation on how to get started with Realm, using the Dynamic Framework method of installation.
At this point I have a workspace that contains an iOS project, the two .framework folders required by Realm, and a Playground project. I have built the workspace without errors.
I figured going through some of the Realm examples in the Playground would be a great way to get going, but doing a simple:
import RealmSwift
results in a "No such module 'RealmSwift' error. What am I missing?
You should install Realm with Cocoapods.
One good practice to adopt is using Cocoapods when using other librairies like this one when they support it. That way you always have control on the version you're using of this library.
Update: Realm Swift works with Swift Playgrounds now. You'll find an example in Realm's release zips (direct download).
Realm doesn't support Swift Playgrounds at the moment: https://github.com/realm/realm-cocoa/issues/938
I faced the same issue while playing with RealmSwift on a Playground. I create it under a single view iOS application. Fixed it after building my main target, as creates the dynamic framework to be linked into the Playground.
Working fine with Cocoapod installation, Swift 4.2, & Xcode 10.1
Try it yourself. https://github.com/sauvikdolui/RealmExploration

Resources