Giter Site home page Giter Site logo

Comments (19)

shortstuffsushi avatar shortstuffsushi commented on July 17, 2024

Hi @francisjervis. Sorry about that. The segmented control used in the SDK is part of a third party framework (HMSegmentedControl). As part of a pull request, and version bump to 1.5, the properties you're seeing warnings about were removed.

However, until now there was no dependency pinned for the framework, so anyone consuming this SDK just got the latest version. As you can see, I've just pushed a commit that pins the dependency to the last known working version. We will need to re-evaluate this framework in the future, since they bumped their SDK version to 7, making it incompatible, but for the time being, this fix should work for you. Let me know if it works :)

from branch-ios-invite-sdk.

shortstuffsushi avatar shortstuffsushi commented on July 17, 2024

Oops, I just realized I need to push the updated version to Cocoapods for you. Unfortunately I don't have permissions with Cocoapods Trunk to do so currently, we'll need to call on @aaustin to get this pushed.

from branch-ios-invite-sdk.

francisjervis avatar francisjervis commented on July 17, 2024

Great, wasn’t expecting a response til Monday, do you guys ever get to go home!?

Also, you have to add multiple lines to import to bridging header (most pods are just the PodName.h). Not a major issue.

Builds if those 2 lines are commented out, as you can see!

On Mar 8, 2015, at 1:31 AM, Graham Mueller [email protected] wrote:

Oops, I just realized I need to push the updated version to Cocoapods for you. Unfortunately I don't have permissions with Cocoapods Trunk to do so currently, we'll need to call on @aaustin https://github.com/aaustin to get this pushed.


Reply to this email directly or view it on GitHub #19 (comment).

from branch-ios-invite-sdk.

francisjervis avatar francisjervis commented on July 17, 2024

Figured out the delegates (the docs don’t list all the required ones), but get an appDelegate crash on tapping “Done”

TimesFree`top_level_code at AppDelegate.swift:24:
0x1002b7708: stp fp, lr, [sp, #-16]!
0x1002b770c: mov fp, sp
0x1002b7710: sub sp, sp, #32
0x1002b7714: bl 0x1005eee24 ; symbol stub for: Swift.C_ARGC.mutableAddressor : Swift.Int32
0x1002b7718: ldr w0, [x0]
0x1002b771c: stur w0, [fp, #-4]
0x1002b7720: bl 0x1005eee30 ; symbol stub for: Swift.C_ARGV.mutableAddressor : Swift.UnsafeMutablePointer<Swift.UnsafeMutablePointer<Swift.Int8>>
0x1002b7724: ldr x0, [x0]
0x1002b7728: str x0, [sp, #16]
0x1002b772c: bl 0x1002b7588 ; type metadata accessor for TimesFree.AppDelegate
0x1002b7730: bl 0x1005eda98 ; symbol stub for: NSStringFromClass
0x1002b7734: movz x2, #0
0x1002b7738: ldr x8, [sp, #16]
0x1002b773c: ldur w9, [fp, #-4]
0x1002b7740: str x0, [sp, #8]
0x1002b7744: mov x0, x9
0x1002b7748: mov x1, x8
0x1002b774c: ldr x3, [sp, #8]
0x1002b7750: bl 0x1005edea0 ; symbol stub for: UIApplicationMain
0x1002b7754: str w0, [sp, #4]
0x1002b7758: mov sp, fp
0x1002b775c: ldp fp, lr, [sp], #16
0x1002b7760: ret

2015-03-08 01:49:30.685 TimesFree[18961:3093165] 0 CoreFoundation 0x0000000185e2e54c + 160
2015-03-08 01:49:30.686 TimesFree[18961:3093165] 1 libobjc.A.dylib 0x0000000196dc40e4 objc_exception_throw + 60
2015-03-08 01:49:30.686 TimesFree[18961:3093165] 2 CoreFoundation 0x0000000185e2e470 + 0
2015-03-08 01:49:30.686 TimesFree[18961:3093165] 3 CoreFoundation 0x0000000185dd8e8c + 188
2015-03-08 01:49:30.686 TimesFree[18961:3093165] 4 TimesFree 0x000000010031fbc0 +[BNCServerInterface encodePostToUniversalString:needSource:] + 1256
2015-03-08 01:49:30.687 TimesFree[18961:3093165] 5 TimesFree 0x000000010031f6a4 +[BNCServerInterface encodePostToUniversalString:] + 88
2015-03-08 01:49:30.687 TimesFree[18961:3093165] 6 TimesFree 0x000000010032e9c4 -[Branch getShortURLWithParams:andChannel:andFeature:andCallback:] + 248
2015-03-08 01:49:30.687 TimesFree[18961:3093165] 7 TimesFree 0x0000000100347658 -[BranchInviteViewController donePressed] + 1152
2015-03-08 01:49:30.687 TimesFree[18961:3093165] 8 UIKit 0x000000018a670774 + 96
2015-03-08 01:49:30.688 TimesFree[18961:3093165] 9 TimesFree 0x0000000100494e6c -[UIApplication(IBGApplication) IBGSendAction:to:from:forEvent:] + 184
2015-03-08 01:49:30.688 TimesFree[18961:3093165] 10 UIKit 0x000000018a670774 + 96
2015-03-08 01:49:30.688 TimesFree[18961:3093165] 11 TimesFree 0x0000000100494e6c -[UIApplication(IBGApplication) IBGSendAction:to:from:forEvent:] + 184
2015-03-08 01:49:30.689 TimesFree[18961:3093165] 12 UIKit 0x000000018a659a88 + 612
2015-03-08 01:49:30.689 TimesFree[18961:3093165] 13 UIKit 0x000000018a670110 + 592
2015-03-08 01:49:30.689 TimesFree[18961:3093165] 14 UIKit 0x000000018a66fd9c + 700
2015-03-08 01:49:30.689 TimesFree[18961:3093165] 15 UIKit 0x000000018a6692f0 + 684
2015-03-08 01:49:30.690 TimesFree[18961:3093165] 16 UIKit 0x000000018a63cbe0 + 264
2015-03-08 01:49:30.690 TimesFree[18961:3093165] 17 TimesFree 0x0000000100494f6c -[UIApplication(IBGApplication) IBGSendEvent:] + 192
2015-03-08 01:49:30.690 TimesFree[18961:3093165] 18 UIKit 0x000000018a8dbf84 + 14992
2015-03-08 01:49:30.691 TimesFree[18961:3093165] 19 UIKit 0x000000018a63b150 + 1716
2015-03-08 01:49:30.691 TimesFree[18961:3093165] 20 CoreFoundation 0x0000000185de6d34 + 24
2015-03-08 01:49:30.691 TimesFree[18961:3093165] 21 CoreFoundation 0x0000000185de5fd8 + 264
2015-03-08 01:49:30.691 TimesFree[18961:3093165] 22 CoreFoundation 0x0000000185de4088 + 712
2015-03-08 01:49:30.692 TimesFree[18961:3093165] 23 CoreFoundation 0x0000000185d111f4 CFRunLoopRunSpecific + 396
2015-03-08 01:49:30.692 TimesFree[18961:3093165] 24 GraphicsServices 0x000000018f11f6fc GSEventRunModal + 168
2015-03-08 01:49:30.692 TimesFree[18961:3093165] 25 UIKit 0x000000018a6a1e6c UIApplicationMain + 1488
2015-03-08 01:49:30.692 TimesFree[18961:3093165] 26 TimesFree 0x00000001002b7754 top_level_code + 76
2015-03-08 01:49:30.693 TimesFree[18961:3093165] 27 TimesFree 0x00000001002b7860 main + 48
2015-03-08 01:49:30.693 TimesFree[18961:3093165] 28 libdyld.dylib 0x0000000197442a08 + 4
2015-03-08 01:49:30.873 TimesFree[18961:3093165] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString appendString:]: nil argument'
*** First throw call stack:
(0x185e2e530 0x196dc40e4 0x185e2e470 0x185dd8e8c 0x10031fbc0 0x10031f6a4 0x10032e9c4 0x100347658 0x18a670774 0x100494e6c 0x18a670774 0x100494e6c 0x18a659a88 0x18a670110 0x18a66fd9c 0x18a6692f0 0x18a63cbe0 0x100494f6c 0x18a8dbf84 0x18a63b150 0x185de6d34 0x185de5fd8 0x185de4088 0x185d111f4 0x18f11f6fc 0x18a6a1e6c 0x1002b7754 0x1002b7860 0x197442a08)
libc++abi.dylib: terminating with uncaught exception of type NSException

On Mar 8, 2015, at 1:31 AM, Graham Mueller [email protected] wrote:

Oops, I just realized I need to push the updated version to Cocoapods for you. Unfortunately I don't have permissions with Cocoapods Trunk to do so currently, we'll need to call on @aaustin https://github.com/aaustin to get this pushed.


Reply to this email directly or view it on GitHub #19 (comment).

from branch-ios-invite-sdk.

shortstuffsushi avatar shortstuffsushi commented on July 17, 2024

I'm looking into your crash, though I'm not quite sure of the cause at the moment. It's somewhat difficult to follow the stack here, but it actually appears to be crashing in the core Branch SDK. I will try to update you with this shortly, but I may have to retire for the night pretty soon and get back to you in the morning.

Could you explain what you mean by the bridging header? Is that something for compatibility with Swift? Unfortunately, I haven't played much with Swift yet, and not at all Cocoapods on Swift. If there is additional configuration that we should be doing for that, could you open another issue?

from branch-ios-invite-sdk.

francisjervis avatar francisjervis commented on July 17, 2024

Absolutely! I should too ;) Let me know if you would like me to build a test project on this side, my far from expert guess would be that it’s a type mismatch when the core is passing data (contact string?) between objC and Swift.

No rush, enjoy your weekend!!
F

On Mar 8, 2015, at 3:07 AM, Graham Mueller [email protected] wrote:

I'm looking into your crash, though I'm not quite sure of the cause at the moment. It's somewhat difficult to follow the stack here, but it actually appears to be crashing in the core Branch SDK. I will try to update you with this shortly, but I may have to retire for the night pretty soon and get back to you in the morning.

Could you explain what you mean by the bridging header? Is that something for compatibility with Swift? Unfortunately, I haven't played much with Swift yet, and not at all Cocoapods on Swift. If there is additional configuration that we should be doing for that, could you open another issue?


Reply to this email directly or view it on GitHub #19 (comment).

from branch-ios-invite-sdk.

francisjervis avatar francisjervis commented on July 17, 2024

https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html

On Mar 8, 2015, at 3:14 AM, Francis Jervis [email protected] wrote:

Absolutely! I should too ;) Let me know if you would like me to build a test project on this side, my far from expert guess would be that it’s a type mismatch when the core is passing data (contact string?) between objC and Swift.

No rush, enjoy your weekend!!
F

On Mar 8, 2015, at 3:07 AM, Graham Mueller <[email protected] mailto:[email protected]> wrote:

I'm looking into your crash, though I'm not quite sure of the cause at the moment. It's somewhat difficult to follow the stack here, but it actually appears to be crashing in the core Branch SDK. I will try to update you with this shortly, but I may have to retire for the night pretty soon and get back to you in the morning.

Could you explain what you mean by the bridging header? Is that something for compatibility with Swift? Unfortunately, I haven't played much with Swift yet, and not at all Cocoapods on Swift. If there is additional configuration that we should be doing for that, could you open another issue?


Reply to this email directly or view it on GitHub #19 (comment).

from branch-ios-invite-sdk.

shortstuffsushi avatar shortstuffsushi commented on July 17, 2024

I suspect that because the code is failing in the [BNCServerInterface encodePostToUniversalString:needSource:] method, you're providing a custom dictionary to be attached to the short url. Could you let me know what is all included in that dictionary, or at least what data types? That particular method only incorporates NSString, NSDictionary, and NSNumber currently. I will be raising (and fixing) an issue to not crash when the data type is invalid, but that will just mean that your "unknown" type will not be present in the encoded data :(

from branch-ios-invite-sdk.

francisjervis avatar francisjervis commented on July 17, 2024

Code is

func  inviteContactProviders() -> [AnyObject]! {
    let providers = [BranchInviteTextContactProvider(inviteMessageFormat: "Join me on TimesFree to share time and save money!\n%@"), BranchInviteEmailContactProvider(subject: "Join me on TimesFree", inviteMessageFormat: "Join me on TimesFree to share time and save money!\n%@")]
    return providers

}

func invitingUserFullname() -> String! {
    return ((curUsr["firstName"] as String!) + " " + (curUsr["lastName"] as String!))
}

func invitingUserId() -> String! {
    return curUsr.objectId as String
}

func invitingUserShortName() -> String! {
     return (curUsr["firstName"] as String!)
}

func  inviteUrlCustomData() -> [NSObject : AnyObject]! {
    return ["exchange": selectedExchange.objectId]
}


func  inviteControllerDidFinish() {

}

func  inviteControllerDidCancel() {

}

Let me cast those as NSString and see if that fixes it...

On Mar 8, 2015, at 3:16 AM, Graham Mueller [email protected] wrote:

I suspect that because the code is failing in the [BNCServerInterface encodePostToUniversalString:needSource:] method, you're providing a custom dictionary to be attached to the short url. Could you let me know what is all included in that dictionary, or at least what data types? That particular method only incorporates NSString, NSDictionary, and NSNumber currently. I will be raising (and fixing) an issue to not crash when the data type is invalid, but that will just mean that your "unknown" type will not be present in the encoded data :(


Reply to this email directly or view it on GitHub #19 (comment).

from branch-ios-invite-sdk.

shortstuffsushi avatar shortstuffsushi commented on July 17, 2024

What is the type of selectedExchange.objectId in the inviteUrlCustomData method?

from branch-ios-invite-sdk.

francisjervis avatar francisjervis commented on July 17, 2024

It’s the ID of a Parse PFObject in an NSString
https://parse.com/docs/ios/api/Classes/PFObject.html#//api/name/objectId https://parse.com/docs/ios/api/Classes/PFObject.html#//api/name/objectId

On Mar 8, 2015, at 3:23 AM, Graham Mueller [email protected] wrote:

What is the type of selectedExchange.objectId in the inviteUrlCustomData method?


Reply to this email directly or view it on GitHub #19 (comment).

from branch-ios-invite-sdk.

francisjervis avatar francisjervis commented on July 17, 2024

It doesn’t work when that’s commented out, either, btw.

On Mar 8, 2015, at 3:25 AM, Francis Jervis [email protected] wrote:

It’s the ID of a Parse PFObject in an NSString
https://parse.com/docs/ios/api/Classes/PFObject.html#//api/name/objectId https://parse.com/docs/ios/api/Classes/PFObject.html#//api/name/objectId

On Mar 8, 2015, at 3:23 AM, Graham Mueller <[email protected] mailto:[email protected]> wrote:

What is the type of selectedExchange.objectId in the inviteUrlCustomData method?


Reply to this email directly or view it on GitHub #19 (comment).

from branch-ios-invite-sdk.

shortstuffsushi avatar shortstuffsushi commented on July 17, 2024

Great news! Found the issue. You're not providing an image url (which is fine!), but the BNCServerInterface method does not properly encode nulls (read: crashes). This will be fixed shortly, and should be available for use tomorrow. Really, really sorry about the slow down in your implementation.

from branch-ios-invite-sdk.

shortstuffsushi avatar shortstuffsushi commented on July 17, 2024

Alright, the latest update for Branch should resolve this for you.

from branch-ios-invite-sdk.

francisjervis avatar francisjervis commented on July 17, 2024

Yes, it does! I got the BranchInvite pod update too.

Just so you know, behavior when there is text in the search field and user switches between sms/email is slightly unexpected (doesn’t apply the search filter but text persists). I had to add code to dismiss the VC on cancel/complete, not sure if that is intended (not documented that you have to). Here’s my code so you have a sample Swift implementation to play with…

func inviteContactProviders() -> [AnyObject]! {
let providers = [BranchInviteTextContactProvider(inviteMessageFormat: "Join me on TimesFree to share time and save money!\n%@"), BranchInviteEmailContactProvider(subject: "Join me on TimesFree", inviteMessageFormat: "Join me on TimesFree to share time and save money!\n%@")]
return providers

}

func invitingUserFullname() -> String! {
    return ((curUsr["firstName"] as NSString!) + " " + (curUsr["lastName"] as NSString!))
}

func invitingUserId() -> String! {
    return curUsr.objectId as NSString
}

func invitingUserShortName() -> String! {
     return (curUsr["firstName"] as NSString!)
}

func  inviteUrlCustomData() -> [NSObject : AnyObject]! {
    return ["exchange": selectedExchange.objectId]
}


func  inviteControllerDidFinish() {
    self.dismissViewControllerAnimated(true, completion: nil)

}

func  inviteControllerDidCancel() {
    self.dismissViewControllerAnimated(true, completion: nil)
}


func buttonClicked(sender: UIButton!) {


        var branchInviter = BranchInviteViewController.branchInviteViewControllerWithDelegate(self)

        self.presentViewController(branchInviter, animated: true, completion: nil)

  }

Thanks for your help, especially on a weekend!!
All the best
Francis

On Mar 8, 2015, at 2:31 PM, Graham Mueller [email protected] wrote:

Alright, the latest update for Branch should resolve this for you.


Reply to this email directly or view it on GitHub #19 (comment).

from branch-ios-invite-sdk.

francisjervis avatar francisjervis commented on July 17, 2024

One more thing: I (and, I strongly suspect, a great many other Branch fans) want this to include FB friend invitations - which would, ideally, mean posting OG message objects. Retrieving an array of the user’s friends looks trivial, OG posting is a world of pain (from Swift in particular), any experience/thoughts on this? Is it something you’re planning to implement?
Best
Francis

On Mar 8, 2015, at 2:44 PM, Francis Jervis [email protected] wrote:

Yes, it does! I got the BranchInvite pod update too.

Just so you know, behavior when there is text in the search field and user switches between sms/email is slightly unexpected (doesn’t apply the search filter but text persists). I had to add code to dismiss the VC on cancel/complete, not sure if that is intended (not documented that you have to). Here’s my code so you have a sample Swift implementation to play with…

func inviteContactProviders() -> [AnyObject]! {
let providers = [BranchInviteTextContactProvider(inviteMessageFormat: "Join me on TimesFree to share time and save money!\n%@"), BranchInviteEmailContactProvider(subject: "Join me on TimesFree", inviteMessageFormat: "Join me on TimesFree to share time and save money!\n%@")]
return providers

}

func invitingUserFullname() -> String! {
    return ((curUsr["firstName"] as NSString!) + " " + (curUsr["lastName"] as NSString!))
}

func invitingUserId() -> String! {
    return curUsr.objectId as NSString
}

func invitingUserShortName() -> String! {
     return (curUsr["firstName"] as NSString!)
}

func  inviteUrlCustomData() -> [NSObject : AnyObject]! {
    return ["exchange": selectedExchange.objectId]
}


func  inviteControllerDidFinish() {
    self.dismissViewControllerAnimated(true, completion: nil)

}

func  inviteControllerDidCancel() {
    self.dismissViewControllerAnimated(true, completion: nil)
}


func buttonClicked(sender: UIButton!) {


        var branchInviter = BranchInviteViewController.branchInviteViewControllerWithDelegate(self)

        self.presentViewController(branchInviter, animated: true, completion: nil)

  }

Thanks for your help, especially on a weekend!!
All the best
Francis

On Mar 8, 2015, at 2:31 PM, Graham Mueller <[email protected] mailto:[email protected]> wrote:

Alright, the latest update for Branch should resolve this for you.


Reply to this email directly or view it on GitHub #19 (comment).

from branch-ios-invite-sdk.

shortstuffsushi avatar shortstuffsushi commented on July 17, 2024

Thanks a lot @francisjervis! I will write up another issue for the bug you just mentioned, and will fix soon.

With regard to your Facebook integration, we do actually have an open issue for this -- #15. I have a local patch that attempts to accomplish the work, but have run into a wall in several areas. Actually getting contacts is not as simple as /me/friends, as the Graph API v2 only includes friends who've already installed the app, which is obviously not terribly useful 😞

I am looking for a solution to this, though, and you're welcome to watch that issue for updates. I will update it shortly with as much as I've mentioned in this post so that other's are able to see the why it isn't done just yet.

from branch-ios-invite-sdk.

francisjervis avatar francisjervis commented on July 17, 2024

that’s potentially quite useful for me, actually. i’d be into using that as part of onboarding...

On Mar 8, 2015, at 2:52 PM, Graham Mueller [email protected] wrote:

Thanks a lot @francisjervis https://github.com/francisjervis! I will write up another issue for the bug you just mentioned, and will fix soon.

With regard to your Facebook integration, we do actually have an open issue for this -- #15 #15. I have a local patch that attempts to accomplish the work, but have run into a wall in several areas. Actually getting contacts is not as simple as /me/friends, as the Graph API v2 only includes friends who've already installed the app, which is obviously not terribly useful

I am looking for a solution to this, though, and you're welcome to watch that issue for updates. I will update it shortly with as much as I've mentioned in this post so that other's are able to see the why it isn't done just yet.


Reply to this email directly or view it on GitHub #19 (comment).

from branch-ios-invite-sdk.

shortstuffsushi avatar shortstuffsushi commented on July 17, 2024

Alright, I will keep that in mind. Please see #20 regarding the other bug you mentioned. If you have any opinions on that, feel free to add them there. Keep an eye on #15 as well for updates.

from branch-ios-invite-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.