Giter Site home page Giter Site logo

Comments (10)

PSBT avatar PSBT commented on August 23, 2024

From the following link you'll be able to download an empty Xcode project that shows this problem:
https://www.dropbox.com/s/4wilvpi8owrf0li/IterableTest.zip?dl=0

from swift-sdk.

tapash-majumder avatar tapash-majumder commented on August 23, 2024

There is something wrong with your Podfile. I am attaching the Podfile that worked for me in the next comment below. Please also remember to clean everything.

rm -rf Pods
rm -rf Pods.lock
rm -rf IterableTest.xcworkspace/
pod update
pod install

from swift-sdk.

tapash-majumder avatar tapash-majumder commented on August 23, 2024
# Uncomment the next line to define a global platform for your project

platform :ios, '9.0'

use_frameworks!

target 'IterableTest' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks

  # Pods for IterableTest
  pod 'Iterable-iOS-SDK'

  target 'IterableTestTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'IterableTestUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

from swift-sdk.

PSBT avatar PSBT commented on August 23, 2024

Sorry in the attached project I had forgotten to add use_frameworks! to the pod file. After adding that the project compiles.

Though I still have the problem in my main project which is Obj-C. In that case how should the pod file look? use_frameworks! must be added to the pod file in that case too? If I add it I start getting compilation errors in pods from other libraries.

Looks like there's no way to specify use_frameworks! only for certain pods so we can't add that to our pod file. Our only option then is to do the manual installation?

from swift-sdk.

tapash-majumder avatar tapash-majumder commented on August 23, 2024

Are you sure about that? I have noticed that in the original Profile user_frameworks! was commented out. Maybe that was the problem. I changed the Podfile as below and it is still working.

# Uncomment the next line to define a global platform for your project

platform :ios, '9.0'

target 'IterableTest' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks

  # Pods for IterableTest
  pod 'Iterable-iOS-SDK'
  
  use_frameworks!


  target 'IterableTestTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'IterableTestUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

from swift-sdk.

PSBT avatar PSBT commented on August 23, 2024

Yes it was commented that was my mistake. I created that empty project for illustrative purposes only. After uncommented that line the sample project I created compiles.

What I'm saying is that in our real project we can't use use_frameworks!. Looks like your pod requires that for the SDK to compile? Can you confirm that?

Is there a way to make it compile via pods without using use_frameworks!? Our real project is entirely Objective-C.

from swift-sdk.

PSBT avatar PSBT commented on August 23, 2024

I'm confused by the fact that your sample Podfile (https://raw.githubusercontent.com/Iterable/swift-sdk/master/sample-apps/swift-sample-app/Podfile) says this:

# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!

We are not using Swift in our project so that must remain commented, right? If we leave it commented then the project doesn't compile (error shown in my first message). If I uncomment it the code that uses other pods from other libraries start giving compilation errors…

from swift-sdk.

tapashmajumder avatar tapashmajumder commented on August 23, 2024

Yes, you do need use_frameworks! I am not sure about other pods in other libraries. But I believe there should be a way to include use_frameworks! per target.

Can you create a sample project that reproduces this problem?

If enabling use_frameworks! per target does not work then maybe the best option is to do manual installation of IterableSDK.framework.

from swift-sdk.

PSBT avatar PSBT commented on August 23, 2024

Got it!

It's possible to use use_frameworks! per target but apparently not per pod (CocoaPods/CocoaPods#3839).

Yeah so looks our only option is the manual installation.

Thanks!

from swift-sdk.

tapashmajumder avatar tapashmajumder commented on August 23, 2024

Thanks @PSBT. Let us know if you have any issues with manual installation.

from swift-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.