Closed angkukuehgirlsg closed 3 years ago
Have tried to run the app with Firebase, but with the same errors:
1) Clone project 2) Open in project Xcode 3) Clean build folder 4) Run project but with errors
Tried to see if works with Firebase but also with the same errors above. What I did:
Appreciate any help please, thank you!
I haven't tried using the project with cocoapods and have only dragged the required Firebase frameworks for Analytics, Crashlytics, and Performance monitoring into the project. If you have removed all Firebase references and it is still looking for the Firebase frameworks like Promises and Protobuf, check the Xcode organizer and project settings to make sure that the framework references have been removed. They should not be shown.
To make things more simple at the cost of binary size, you can manually install Firebase frameworks in your project (https://github.com/firebase/firebase-ios-sdk/releases/) and then disable Firebase integration in the Constants.h definition.
Hi Anson, thank you so much for the reply!
I've gotten errors even thought I simply cloned the project file and run it on xcode (without altering any files). Am I missing something which I should be installing, hence the errors?
If you have not modified any files in the project directory, you still need to import the required Firebase frameworks and confirm that the Frameworks are linked to the MessagesExtension target where they are referenced.
Hi Anson, thank you for your quick replies! I've managed to run it after removing the frameworks under project settings. Appreciate your help!
May I also seek your advice, if it's possible to include more sticker packs by expanding the sticker-pack-button area (e.g. allowing scrolling left-right to choose the sticker packs, something similar to WhatsApp sticker function)?
E.g. Have tried including 10 sticker packs and the button to choose each sticker pack is quite small ><
@angkukuehgirlsg I would assume that you can get the desired scrolling behavior by putting the segmented control button (or custom UIView) inside a UIScrollView that is set to move horizontally. I haven't needed it yet so this has not been implemented yet. If you do manage to get it working, please share your results!
@ansonl Thank you for the tip! Let me try it out, will share it here if I manage to get it working.
Can I also seek your advice on this error of importing the stickers into WhatsApp? I've checked that my stickers are 512x512px but it still shows this error.
Managed to import the stickers into WhatsApp! Please ignore the comment above.
Will work on the scrolling function and update here if I manage to get it to work.
Hi @ansonl, thanks for the tip in switching to a custom UIView inside a UIScrollView. Can I seek your help please? Here are some possibilities I've thought of but tried to no avail (it's my first time doing an iOS app ><) :
How may I replace the UISegmentedControl with either a UIButton (will need to use tray_icon as title instead) or UIPickerView?
Or how may I use the tray_icon as the title for the segmented control title so as to try include categories?
Hi @ansonl, thanks for the tip to include the segmented control in a horizontal scroll. What I've done so far: 1) Added scroll view (*refer to screenshots attached below: blue area) 2) Added segmented control to scroll view
However, am facing problems with: 1) scroll view dimensions (i.e. width) doesn't change when phone orientation changes, hence the segment control now appears 'cut off' 2) the segment now can't be tapped (i.e. I can't switch between segments) 3) the segment can't be scrolled
Appreciate your advice please, thank you!
I haven't looked into this in depth myself, but a search brought me to this post on Stack Overflow that may get you in the right direction. It mentions that the scroll view content size property must be set to match the segmented control view size.
Thanks for helping to check it out!
Yep I've set the content size to segmented control view size but it still doesn't scroll. :/ From further troubleshooting of the UIScrollView, I realised that the UIScrollView doesn't scroll when the stickers are there (I think it's the browserView / _browserViewController.view), yet the UIScrollView scrolls (yay finally!) when I somehow removed* the stickers (or browserView).
*I accidentally removed them when toggling the Horizontal constraints:
[messageViewConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[browserView]|" options:0 metrics:nil views:bindings]];
So would like to seek your help, is there any way I can set the browserView frame to be below the segmented control (hence the UIScrollView) so the scrolling functions don't overlap? (And hope the UIScrollView will then work...)
Sorry to add on, but for the scrolling of segmented control, I think this might explain it:
Turns out the issue isn't with the scroll view but with the segmented control. In iOS 13 you can swipe/pan to change the selected segment which prevents the scroll view from scrolling. The solution is to subclass the control, override gestureRecognizerShouldBegin and paradoxically return true.
Can I seek your advice on how and where do I include this code (e.g. rewrite this in Objective-C and place under MessagesViewControl.m)?
class NoSwipeSegmentedControl: UISegmentedControl { override func gestureRecognizerShouldBegin( gestureRecognizer: UIGestureRecognizer) -> Bool { return true } }_
Sorry for the multiple replies but I've somehow managed to get the scrolling function to work!
But I'm not sure why now the stickers (1) can't be tapped/selected (2) the view that the sticker pack is in, is cut off at the bottom.
Is there any way I can set the starting y-position of that sticker pack frame (highlighted in red in screenshot above)? So that is below the segmented control.
I was trying to adjust the position by editing the horizontal constraints and then the sticker pack frame disappeared... : /
[messageViewConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[_segmentedControl]-20-[browserView]" options:0 metrics:nil views:bindings]];
For the end of the visual format, after the [browserView]
you may need to reference the bottom of the view to provide the Autolayout system with the height of the sticker browser view. Otherwise the Autolayout system is ambiguous about how high to make the sticker browser content view.
Thank you for all the help! We've managed to get it to work!
Can I check with you if there is a way to add animated stickers for WA? I tried adding animated .webp files in the sticker pack but it doesn't appear when saving the sticker pack in WA.
I do not think animated stickers were supported for WA as of 2020. I haven't tried since then.
Hi, I tried to clone the entire folder but when I run the project (without editing or deleting anything), I am unable to run the project due to 4 MessageExtension issues, such as:
error: /Users/J/Downloads/ios-sticker-packs-app-master/FirebaseCrashlytics.xcframework/ios-i386_x86_64-simulator/FirebaseCrashlytics.framework: No such file or directory (in target 'MessagesExtension' from project 'Fluffcorn')
Please refer to screenshot attached.
Also, as I do not want Firebase integration, I tried to remove the Firebase references but resulted in more errors. Steps I've done:
1) Cloned the entire folder. 2) Set kFirebaseEnabled in Constants.h to NO. 3) Deleted 'Firebase resources'. 4) Deleted 'Firebase frameworks'. Then I received an error of "'Firebase.h' file not found" 5) So I deleted the line 17 "#import "Firebase.h"" Then there were more errors. Screenshot attached.
6) I tried deleted the related errors. Then I received an error saying "framework not found WebP".
"ld: warning: directory not found for option '-F/Users/J/Downloads/ios-sticker-packs-app-master/WAStickers frameworks' ld: framework not found WebP clang: error: linker command failed with exit code 1 (use -v to see invocation)"
Appreciate your help please!